<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="Base64Encoder,com.swfjunkie.tweetr.utils.Base64Encoder,CHARSET_UTF_8,insertNewLines,newLine,encode,encodeBytes,encodeUTFBytes,reset,toString" name="keywords">
<title>com.swfjunkie.tweetr.utils.Base64Encoder</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Base64Encoder - Tweetr Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Tweetr Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/swfjunkie/tweetr/utils/Base64Encoder.html&amp;com/swfjunkie/tweetr/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Base64Encoder</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Base64Encoder"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.swfjunkie.tweetr.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Base64Encoder</td>
</tr>
</table>
<p></p>
 A utility class to encode a String or ByteArray as a Base64 encoded String.
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#insertNewLines">insertNewLines</a> : Boolean = true<div class="summaryTableDescription">
     A Boolean flag to control whether the sequence of characters specified
     for <code>Base64Encoder.newLine</code> are inserted every 76 characters
     to wrap the encoded output.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#newLine">newLine</a> : int = 10<div class="summaryTableDescription">[static]
     The character codepoint to be inserted into the encoded output to
     denote a new line if <code>insertNewLines</code> is true.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Base64Encoder()">Base64Encoder</a>()</div>
<div class="summaryTableDescription">
     Constructor.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#encode()">encode</a>(data:String, offset:uint = 0, length:uint = 0):void</div>
<div class="summaryTableDescription">
     Encodes the characters of a String in Base64 and adds the result to
     an internal buffer.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#encodeBytes()">encodeBytes</a>(data:ByteArray, offset:uint = 0, length:uint = 0):void</div>
<div class="summaryTableDescription">
     Encodes a ByteArray in Base64 and adds the result to an internal buffer.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#encodeUTFBytes()">encodeUTFBytes</a>(data:String):void</div>
<div class="summaryTableDescription">
     Encodes the UTF-8 bytes of a String in Base64 and adds the result to an
     internal buffer.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reset()">reset</a>():void</div>
<div class="summaryTableDescription">
     Clears all buffers and resets the encoder to its initial state.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
     Returns the current buffer as a Base64 encoded String.</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#CHARSET_UTF_8">CHARSET_UTF_8</a> : String = "UTF-8"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">Base64Encoder</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="insertNewLines"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">insertNewLines</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var insertNewLines:Boolean = true</code><p>
     A Boolean flag to control whether the sequence of characters specified
     for <code>Base64Encoder.newLine</code> are inserted every 76 characters
     to wrap the encoded output.
     
     The default is true.
     </p></div>
<a name="newLine"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">newLine</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static var newLine:int = 10</code><p>
     The character codepoint to be inserted into the encoded output to
     denote a new line if <code>insertNewLines</code> is true.
     
     The default is <code>10</code> to represent the line feed <code>\n</code>.
     </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Base64Encoder()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Base64Encoder</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Base64Encoder()</code><p>
     Constructor.
     </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="encode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">encode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function encode(data:String, offset:uint = 0, length:uint = 0):void</code><p>
     Encodes the characters of a String in Base64 and adds the result to
     an internal buffer. Subsequent calls to this method add on to the
     internal buffer. After all data have been encoded, call
     <code>toString()</code> to obtain a Base64 encoded String.
     
     </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">data</span>:String</code> &mdash; The String to encode.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">offset</span>:uint</code> (default = <code>0</code>)<code></code> &mdash; The character position from which to start encoding.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">length</span>:uint</code> (default = <code>0</code>)<code></code> &mdash; The number of characters to encode from the offset.
     </td>
</tr>
</table>
</div>
<a name="encodeBytes()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">encodeBytes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function encodeBytes(data:ByteArray, offset:uint = 0, length:uint = 0):void</code><p>
     Encodes a ByteArray in Base64 and adds the result to an internal buffer.
     Subsequent calls to this method add on to the internal buffer. After all
     data have been encoded, call <code>toString()</code> to obtain a
     Base64 encoded String.
     
     </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">data</span>:ByteArray</code> &mdash; The ByteArray to encode.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">offset</span>:uint</code> (default = <code>0</code>)<code></code> &mdash; The index from which to start encoding.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">length</span>:uint</code> (default = <code>0</code>)<code></code> &mdash; The number of bytes to encode from the offset.
     </td>
</tr>
</table>
</div>
<a name="encodeUTFBytes()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">encodeUTFBytes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function encodeUTFBytes(data:String):void</code><p>
     Encodes the UTF-8 bytes of a String in Base64 and adds the result to an
     internal buffer. The UTF-8 information does not contain a length prefix. 
     Subsequent calls to this method add on to the internal buffer. After all
     data have been encoded, call <code>toString()</code> to obtain a Base64
     encoded String.
     
     </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">data</span>:String</code> &mdash; The String to encode.
     </td>
</tr>
</table>
</div>
<a name="reset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reset():void</code><p>
     Clears all buffers and resets the encoder to its initial state.
     </p></div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
     Returns the current buffer as a Base64 encoded String. Note that
     calling this method also clears the buffer and resets the 
     encoder to its initial state.
     
     </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The Base64 encoded String.
     </td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="CHARSET_UTF_8"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">CHARSET_UTF_8</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const CHARSET_UTF_8:String = "UTF-8"</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">[swfjunkie.com] - Open source under Simplified BSD</center>
</div>
</body>
</html>
<!--[swfjunkie.com] - Open source under Simplified BSD-->
